package com.lanhai.mind.beans;

import com.lanhai.mind.enums.DotTypeEnum;

/**
 * 点位数据定义
 * @author zhengwei
 *
 */
public class DotBean {
	private int dotNO;
	private String dotName;
	private DotTypeEnum dotType;
	 
	//区域
	private int minX;
	private int maxX;
	private int minY;
	private int maxY;
	 
	
	//来源路线（设备分组用）
	private int sourceRoad;
	private int targetRoad;
	
	//下道工序
	private String nextProcess;
 
	//路由路线
	private int routeRoad;
	
	
	 //目标机台（注意，这是设备分组）
	private String nextDevice;
	
	
	public int getDotNO() {
		return dotNO;
	}
	public void setDotNO(int dotNO) {
		this.dotNO = dotNO;
	}
	public String getDotName() {
		return dotName;
	}
	public void setDotName(String dotName) {
		this.dotName = dotName;
	}
	public DotTypeEnum getDotType() {
		return dotType;
	}
	public void setDotType(DotTypeEnum dotType) {
		this.dotType = dotType;
	}
	public int getMinX() {
		return minX;
	}
	public void setMinX(int minX) {
		this.minX = minX;
	}
	public int getMaxX() {
		return maxX;
	}
	public void setMaxX(int maxX) {
		this.maxX = maxX;
	}
	public int getMinY() {
		return minY;
	}
	public void setMinY(int minY) {
		this.minY = minY;
	}
	public int getMaxY() {
		return maxY;
	}
	public void setMaxY(int maxY) {
		this.maxY = maxY;
	}
	public int getSourceRoad() {
		return sourceRoad;
	}
	public void setSourceRoad(int sourceRoad) {
		this.sourceRoad = sourceRoad;
	}
	public int getTargetRoad() {
		return targetRoad;
	}
	public void setTargetRoad(int targetRoad) {
		this.targetRoad = targetRoad;
	}
	
 
	public void setArea(int x,int y,int r) {
		//int r=50; //50cm
		minX=x-r;
		maxX=x+r;
		minY=y-r;
		maxY=y+r;
	}
	
	public boolean inArea(int x,int y) {
		if(minX<=x&&x<=maxX
				&&minY<=y&&y<=maxY) {
			return true;
		}else {
			return false;
		}
	}
	public int getRouteRoad() {
		return routeRoad;
	}
	public void setRouteRoad(int routeRoad) {
		this.routeRoad = routeRoad;
	}
	public String getNextProcess() {
		return nextProcess;
	}
	public void setNextProcess(String nextProcess) {
		this.nextProcess = nextProcess;
	}
	public String getNextDevice() {
		return nextDevice;
	}
	public void setNextDevice(String nextDevice) {
		this.nextDevice = nextDevice;
	}
	
	
}
